<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Issue Test</title>
<script>
function printResults(txt, style) {
    var d = document.createElement('div');
    d.innerHTML = txt;
    d.className = style;
    document.getElementById('out').appendChild(d);
  }
</script>
</head>
<body>

<p><a href="https://github.com/seajs/seajs/issues/342">#342</a></p>
<div id="out"></div>

<script src="../../../dist/sea.js"></script>
<script>
  (function() {
    var mapRules = []
    mapRules.push(function(url) {
      if (url.indexOf('dist/b.js') > 0 ) {
        return './b.js'
      }
      return url
    })

    seajs.config({
      map: mapRules
    })

    var _use = seajs.use
    seajs.use = function(ids, callback) {
      _use('./a.js', function(a) {
        _use(ids, callback)
      })
    }
  })()
</script>
<script>
  seajs.use(['b', '../../test'], function(b, test) {
    test.assert(b === 'b')
    test.done()
  })
</script>

</body>
</html>
